package com.hpeng.util;

public class PageBean {
	// 第一条记录的起点
	private int firstResult;

	// 每页记录数
	private int maxResult = 20;

	// 当前页数
	private int currentPage;

	public int getFirstResult() {
		return (this.currentPage - 1) * maxResult;
	}

	public void setFirstResult(int firstResult) {
		this.firstResult = firstResult;
	}

	public int getMaxResult() {
		return maxResult;
	}

	public void setMaxResult(int maxResult) {
		this.maxResult = maxResult;
	}

	public void setStrCurrentPage(String page) {
		if (page == null) {
			this.currentPage = 1;
		} else {
			this.currentPage = Integer.parseInt(page);
		}
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

}